<?php

namespace app\tool;

use app\factory\Factory;
use app\model\test\AppendUserId;
use app\model\test\DeviceActivate;
use think\facade\Db;
use think\facade\Log;

/**
 * ClassName:
 * @author leijunxiang
 * @time 2024/10/7
 * @auditor
 */
class TestTool
{
    /**
     * 用户查询(设备号)
     * @param $deviceId
     * @return void
     */
    public function selectUser($deviceId)
    {
        //获取用户操作对象
//        $dataOpe = Factory::getInstance()->getToolObj(DeviceActivate::TOOL_DEVICE_ACTIVATE);
//        $data = DeviceActivate::where(['code'=>$deviceId])->find();
//        $value = Db::table('DeviceActivate')->where('code', '=', $deviceId)->cache(60)->find();
        $value = Db::table('DeviceActivate')->where('state', '=', '未激活')->paginate(10)->toJson();
//        $value = Db::table('DeviceActivate')->count();
//        var_dump("查看数据",$value);
        var_dump("查看数据",$value);
//        return $data;
    }
}